// AUSlotsSpinTestSubstNoteIDToIconID.H : Declaration of the CAUSlotsSpinTestSubstNoteIDToIconID class

#ifndef __AUSLOTSSPINTESTSUBSTNOTEIDTOICONID_H_
#define __AUSLOTSSPINTESTSUBSTNOTEIDTOICONID_H_

class CAUSlotsSpinTestSubstNoteIDToIconIDAccessor
{
public:
	LONG m_gutsid;
	BYTE m_noteid;
	BYTE m_iconid;

BEGIN_COLUMN_MAP(CAUSlotsSpinTestSubstNoteIDToIconIDAccessor)
	COLUMN_ENTRY(1, m_noteid)
	COLUMN_ENTRY(2, m_iconid)
END_COLUMN_MAP()

BEGIN_PARAM_MAP(CAUSlotsSpinTestSubstNoteIDToIconIDAccessor)
	COLUMN_ENTRY(1, m_gutsid)
END_PARAM_MAP()

DEFINE_COMMAND_EX(CAUSlotsSpinTestSubstNoteIDToIconIDAccessor, L" \
	SELECT \
		noteid, \
		iconid  \
	FROM dbo.AUSlotsSpinTestSubstNoteIDToIconID \
	WHERE gutsid = ?")

	// You may wish to call this function if you are inserting a record and wish to
	// initialize all the fields, if you are not going to explicitly set all of them.
	void ClearRecord()
	{
		memset(this, 0, sizeof(*this));
	}
};

class CAUSlotsSpinTestSubstNoteIDToIconID : public CCommand<CAccessor<CAUSlotsSpinTestSubstNoteIDToIconIDAccessor> >
{
public:
	HRESULT Open( CSession* pSession )
	{
		return CCommand<CAccessor<CAUSlotsSpinTestSubstNoteIDToIconIDAccessor> >::Open(*pSession);
	}
};

#endif // __AUSLOTSSPINTESTSUBSTNOTEIDTOICONID_H_
